<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/jsp/common/common.jsp"%>
<%
	String domainId = request.getAttribute("domainId") == null?"":request.getAttribute("domainId").toString();
	String parentId = request.getAttribute("parentId") == null?"":request.getAttribute("parentId").toString();
	String type = request.getAttribute("type") == null?"":request.getAttribute("type").toString();
%>
</head>
<body>

	<div class="documentContent" id="documentContent">

		<!-- form-box -->
		<div class="form-box">
			<h2 class="form-title">群组信息</h2>
			<div class="form-content">
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="form-table">
					<tr>
						<td class="form-table-tdleft" width="25%">群组名称：</td>
						<td width="75%"><input class="table-input" type="text" name="name" id="name" value="" /></td>
					</tr>
					<tr>	
						<td class="form-table-tdleft">群组编号：</td>
						<td><input class="table-input" type="text" name="serialNumber" id="serialNumber" value="" /></td>
					</tr>
					<tr>
						<td class="form-table-tdleft">群组类型：</td>
						<td><select class="table-input" id="type" name="type"></select></td>
					</tr>
					<tr>	
						<td class="form-table-tdleft">群组描述：</td>
						<td><input class="table-input" name="description" id="description" value="" /></td>
					</tr>
				</table>
			</div>
		</div>
		<!-- form-box -->
		
		<input type="hidden" name="domainId" id="domainId" value="<%=domainId %>" />
		<input type="hidden" name="parentId" id="parentId" value="<%=parentId %>" />

	</div>

<script type="text/javascript">

var domainId = '<%=domainId %>';
var parentId = '<%=parentId %>';
var type= '<%=type %>';


$(document).ready(function(){
	
	getPageData();

});

function getPageData(){
	
}

function onConfrim(layerObject,zTreeGobalObjcet){
	
	var url = '<%=basePath%>/biz/ou/org/saveOrganization.do';
	var jsonData = new Object();
	$('body').find(':input').each(function(index,element){
		var key = $(element).attr('id');
		var value = $(element).val();
		if(key){
			jsonData[key] = value;
		}
	});
	
	var jsonDataStr = JSON.stringify(jsonData);
	$.ajax({
		url : url,
		type : 'post',
		dataType : 'json',
		data:{jsonData:jsonDataStr},
		success : function(data, textStatus, jqXHR) {
			showAlert('添加成功',function(){
				layerObject.close();
				zTreeGobalObjcet.reAsyncChildNodes(null, "refresh");
			});
		},
		error : function(XMLHttpRequest, textStatus, errorThrown) {
		}
	});
	
}



</script>
</body>
</html>